package com.question.view.command.play;

import com.question.entity.User;
import com.question.utils.InputOutUtils;
import com.question.view.command.ICommand;

public abstract class PlayerSuper implements ICommand{
	private  User player;
	public User getPlayer() {
		return player;
	}

	public void setPlayer(User player) {
		this.player = player;
	}
	
	@Override
	public void exec() {
		if(Verification()) {
			InputOutUtils.print("你还没有登陆咯");
			return;
		}
		exec(player);
		
	}
	/*
	 * 验证用户是否登录
	 */
	private Boolean Verification() {
		return player == null;
	}
	
	protected abstract void exec(User player);
	

}
